/*************************************************
 * 描述: 病人模型结构体(测试实体)
 *
 * File: paint.h
 * Author: shizhixin@mozihealthcare.cn
 * Date: 2025-10-16
 * Update:
 * ************************************************/
#ifndef COREXI_COMMON_PC_PAINT_H
#define COREXI_COMMON_PC_PAINT_H

#include <QDateTime>
#include <QObject>

class Patient : public QObject
{
	Q_OBJECT

	// 基本信息
	Q_PROPERTY(int id MEMBER m_id)
	Q_PROPERTY(QString name MEMBER m_name)
	Q_PROPERTY(QString gender MEMBER m_gender)
	Q_PROPERTY(int age MEMBER m_age)
	Q_PROPERTY(QString medicalRecordNo MEMBER m_medicalRecordNo)
	Q_PROPERTY(QDate birthDate MEMBER m_birthDate)
	Q_PROPERTY(QString contactNumber MEMBER m_contactNumber)
	Q_PROPERTY(QString address MEMBER m_address)
	Q_PROPERTY(QString bloodType MEMBER m_bloodType)
	// 医疗信息
	Q_PROPERTY(QString allergies MEMBER m_allergies)
	Q_PROPERTY(QString medicalHistory MEMBER m_medicalHistory)
	// 系统字段
	Q_PROPERTY(QDateTime createTime MEMBER m_createTime)
	Q_PROPERTY(QDateTime updateTime MEMBER m_updateTime)
	// 测试字段
	Q_PROPERTY(bool test MEMBER m_test)
	Q_PROPERTY(double test2 MEMBER m_test2)

public:
	int m_id;// 病人ID
	QString m_name;// 病人姓名
	QString m_gender;// 性别
	int m_age;// 年龄
	QString m_medicalRecordNo;// 病历号
	QDate m_birthDate;// 出生日期
	QString m_contactNumber;// 联系方式
	QString m_address;// 地址
	QString m_bloodType;// 血型
	QString m_allergies;// 过敏史
	QString m_medicalHistory;// 既往病史
	QDateTime m_createTime;// 创建时间
	QDateTime m_updateTime;// 更新时间
	bool m_test = false;
	double m_test2 = 1.11111;

	/**
	 * @brief 默认构造函数
	 */
	explicit Patient(QObject* parent = nullptr)
		: QObject(parent)
	{
		m_createTime = QDateTime::currentDateTime();
		m_updateTime = QDateTime::currentDateTime();
	}

	/**
	 * @brief 带参数的构造函数
	 */
	Patient(int id, const QString& name, const QString& gender, int age,
	        const QString& medicalRecordNo, const QDate& birthDate,
	        const QString& contactNumber, const QString& address,
	        const QString& bloodType, const QString& allergies,
	        const QString& medicalHistory,
	        QObject* parent = nullptr)
		: QObject(parent),
		  m_id(id),
		  m_name(name),
		  m_gender(gender),
		  m_age(age),
		  m_medicalRecordNo(medicalRecordNo),
		  m_birthDate(birthDate),
		  m_contactNumber(contactNumber),
		  m_address(address),
		  m_bloodType(bloodType),
		  m_allergies(allergies),
		  m_medicalHistory(medicalHistory)
	{
		m_createTime = QDateTime::currentDateTime();
		m_updateTime = QDateTime::currentDateTime();
	}
};

#endif //COREXI_COMMON_PC_PAINT_H